#include "bienvenue.h"

Bienvenue::Bienvenue(QWidget *parent) :
    QWidget(parent)
{
    this->fenetre = (MainWindow *)parent;
    this->setMinimumSize(600, 150);
    this->setMouseTracking(true);
    this->setCursor(QCursor(Qt::PointingHandCursor));
}


void Bienvenue::paintEvent (QPaintEvent *)
{
    QPainter * painter = new QPainter(this);
    painter->fillRect(0,0, this->width(), this->height(), Qt::white);
    painter->drawImage(0,0,
            QImage(":/images/images/bienvenue.gif"));

    delete painter;
}

void Bienvenue::mousePressEvent(QMouseEvent * e)
{
    this->fenetre->remplir();
}
